package com.example.loop.entity;

import java.util.Objects;

@javax.persistence.Entity
public class Role {
    private int id;
    private String role;
    private String desc;

    @javax.persistence.Id
    @javax.persistence.Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @javax.persistence.Basic
    @javax.persistence.Column(name = "role")
    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    @javax.persistence.Basic
    @javax.persistence.Column(name = "desc")
    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Role role1 = (Role) o;
        return id == role1.id && Objects.equals(role, role1.role) && Objects.equals(desc, role1.desc);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, role, desc);
    }
}
